package cn.com.shopec.erp.base.service;

import java.lang.reflect.InvocationTargetException;
import java.util.List;

import cn.com.shopec.erp.base.entity.SupplierInfo;
import cn.com.shopec.erp.base.vo.SupplierVo;
import cn.com.shopec.erp.common.page.PageFinder;
import cn.com.shopec.erp.common.page.PageQuery;

public interface ISupplierInfoService {

    /**
     * 查询供应商信息
     * 
     * @param supplierInfo
     * @return
     */
    public PageFinder<SupplierInfo> querySupplierInfos(SupplierInfo supplierInfo1, PageQuery pageQuery);

    /**
     * 新增供应商信息
     * 
     * @param supplierInfo
     * @return
     * @throws Exception
     */
    public SupplierInfo addSupplierInfo(SupplierVo vo) throws Exception;

    /**
     * 修改供应商信息
     * 
     * @param supplierInfo
     * @return
     * @throws Exception
     */
    public String updateSupplierInfo(SupplierVo vo, String aslist) throws Exception;

    /**
     * 根据供应商编号等到供应商基本信息
     * 
     * @param code
     * @return
     */
    public SupplierInfo getSupplierInfoBySuppCode(String suppCode);

    /**
     * 根据供应商code获取供应商基本信息
     * 
     * @param code
     * @return
     * @throws Exception
     */
    public SupplierInfo getSupplierInfoCode(String code) throws Exception;

    /**
     * 根据id删除供应商
     * 
     * @param code
     * @throws Exception
     */
    public void delSupplier(String code) throws Exception;

    /**
     * 查看所有未删除的供应商
     * 
     * @return
     */
    public List<SupplierInfo> getAllSupplierInfo();

    /**
     * 根据供应商编号与结算类型查询
     * 
     * @param vo
     * @return
     * @throws NoSuchMethodException
     * @throws InvocationTargetException
     * @throws IllegalAccessException
     */
    public List<SupplierVo> getSupplierVoBysupCodeAndaccountsType(SupplierVo vo) throws IllegalAccessException,
            InvocationTargetException, NoSuchMethodException;

    /**
     * 根据供应商编号与结算类型查询
     * 
     * @param vo
     * @return
     * @throws NoSuchMethodException
     * @throws InvocationTargetException
     * @throws IllegalAccessException
     */
    public SupplierVo getSupplierVo(SupplierVo supVo) throws IllegalAccessException, InvocationTargetException,
            NoSuchMethodException;

    /**
     * 修改状态
     * 
     * @param supplierInfo
     * @throws Exception
     */
    public void updateState(SupplierInfo supplierInfo) throws Exception;

    /**
     * 根据供应商帐号查询供应商
     * 
     * @param supplierInfo
     * @return
     * @throws Exception
     ***/
    public List<SupplierInfo> getSupplierAccount(String account) throws Exception;

    
	/**
	 *  根据供应商名称查询供应商
	 *
	 * @param supName
	 * @return
	 */
	public List<SupplierInfo> checkSupName(String supName)throws Exception;
    /**
     * 修改密码
     * */
    public void updatePassword(SupplierInfo info);

    /**
     * 通过供应商账号获取供应商Vo对象信息
     * 
     * @param account
     * @return
     * @throws Exception
     */
    public SupplierVo getSupplierVoByLoginName(String account) throws Exception;

    /**
     * 查询时间区间内里更新过后供应商信息
     * 
     * @param startTime
     * @param endTime
     * @return
     */
    public List<SupplierInfo> getSupplyInfoByTimeArea(String startTime, String endTime) throws Exception;

    /**
     * 根据编号修改密码
     * 
     * @param code
     * @param pwd
     * @throws Exception
     */
    public void updatePwd(SupplierInfo supplierInfo) throws Exception;
    
    /**
     * 定时清理合同过期的供应商
     */
	void supplierFailure();

	PageFinder<SupplierInfo> querySupplier(SupplierVo supplierVo,
			PageQuery pageQuery);
	
	List<?> getExportExcel(SupplierVo supVo);
	
	/**
	 * 分布查询供应商信息
	 *  @param pageQuery
	 * @return
	 */
	public PageFinder<SupplierInfo> getPagedCollectSetList(PageQuery pageQuery);
	
	/**
     * 查询供应商信息
     * 
     * @param supplierInfo
     * @return
     */
    public SupplierInfo getSupplierInfoById(String suppcode);
    
    /**
     * 查询供应商信息
     * 
     * @param supplierInfo
     * @return
     */
    public SupplierInfo getSupplierInfoBySupName(String suppName);


}
